<div>
  <mat-checkbox [(ngModel)]="data.service.attributeReleasePolicy.consentPolicy.enabled">
    <ng-container i18n="services.form.label.attrRelease.constent.enabled">
      {{ messages.services_form_label_attrRelease_consent_enabled }}
    </ng-container>
    <mat-icon style="font-size: medium"
             i18n-matTooltip="services.form.tooltip.attrRelease.consent.enabled"
             [matTooltip]="messages.services_form_tooltip_attrRelease_consent_enabled">help
    </mat-icon>
  </mat-checkbox>
</div>

<div *ngIf="data.service.attributeReleasePolicy.consentPolicy.enabled && !isEmpty( formData.availableAttributes )">
  <mat-form-field class="textInput">
    <mat-select multiple
                i18n-placeholder="services.form.label.attrRelease.consent.excludedAttributes"
                [placeholder]="messages.services_form_label_attrRelease_consent_excludedAttributes"
                [(ngModel)]="data.service.attributeReleasePolicy.consentPolicy.excludedAttributes">
      <mat-option *ngFor="let opt of formData.availableAttributes" [value]="opt">
        {{ opt }}
      </mat-option>
    </mat-select>
  </mat-form-field>
  <mat-icon style="font-size: medium"
           i18n-matTooltip="services.form.tooltip.attrRelease.consent.excludedAttributes"
           [matTooltip]="messages.services_form_tooltip_attrRelease_consent_excludedAttributes">help
  </mat-icon>
</div>

<div *ngIf="data.service.attributeReleasePolicy.consentPolicy.enabled && !isEmpty( formData.availableAttributes )">
  <mat-form-field class="textInput">
    <mat-select multiple
                i18n-placeholder="services.form.label.attrRelease.consent.includeOnlyAttributes"
                [placeholder]="messages.services_form_label_attrRelease_consent_includeOnlyAttributes"
                [(ngModel)]="data.service.attributeReleasePolicy.consentPolicy.includeOnlyAttributes">
      <mat-option *ngFor="let opt of formData.availableAttributes" [value]="opt">
        {{ opt }}
      </mat-option>
    </mat-select>
  </mat-form-field>
  <mat-icon style="font-size: medium"
           i18n-matTooltip="services.form.tooltip.attrRelease.consent.includeOnlyAttributes"
           [matTooltip]="messages.services_form_tooltip_attrRelease_consent_includeOnlyAttributes">help
  </mat-icon>
</div>
